package com.chixing.day12.Pointer;

/**
 * 该类表示坐标
 * @param <E> 泛型
 *    泛型作用:数据类型安全性
 *            类型参数化
 */
public class PointerDemo <E>{
    private E x;
    private E y;

    public PointerDemo() {
    }

    public PointerDemo(E x, E y) {
        this.x = x;
        this.y = y;
    }

    public E getX() {
        return x;
    }

    public void setX(E x) {
        this.x = x;
    }

    public E getY() {
        return y;
    }

    public void setY(E y) {
        this.y = y;
    }

    @Override
    public String toString() {
        return "PointerDemo{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
